// =============================================
// Nginx 参数 HTML
// 包含服务器配置、位置块、代理配置等参数
// =============================================

// Nginx 参数 HTML
const nginxParameters = `
<div class="parameter-group">
    <h3><i class="fas fa-server"></i> 服务器配置</h3>
    <button class="param-btn" data-command="server {">
        <i class="fas fa-server"></i> Server 块
    </button>
    <button class="param-btn" data-command="    listen 80;">
        <i class="fas fa-plug"></i> 监听端口
    </button>
    <button class="param-btn" data-command="    server_name example.com;">
        <i class="fas fa-globe"></i> 服务器名称
    </button>
    <button class="param-btn" data-command="    root /var/www/html;">
        <i class="fas fa-folder"></i> 根目录
    </button>
    <button class="param-btn" data-command="    index index.html index.htm;">
        <i class="fas fa-file"></i> 索引文件
    </button>
</div>

<div class="parameter-group">
    <h3><i class="fas fa-map-marker-alt"></i> 位置块</h3>
    <button class="param-btn" data-command="location / {">
        <i class="fas fa-map-marker-alt"></i> 位置块
    </button>
    <button class="param-btn" data-command="    try_files $uri $uri/ =404;">
        <i class="fas fa-search"></i> try_files 指令
    </button>
    <button class="param-btn" data-command="    return 301 https://$host$request_uri;">
        <i class="fas fa-share"></i> 重定向
    </button>
</div>

<div class="parameter-group">
    <h3><i class="fas fa-exchange-alt"></i> 代理配置</h3>
    <button class="param-btn" data-command="    proxy_pass http://localhost:3000;">
        <i class="fas fa-exchange-alt"></i> 代理传递
    </button>
    <button class="param-btn" data-command="    proxy_set_header Host $host;">
        <i class="fas fa-heading"></i> 设置代理头
    </button>
    <button class="param-btn" data-command="    proxy_http_version 1.1;">
        <i class="fas fa-code"></i> HTTP 版本
    </button>
</div>

<div class="parameter-group">
    <h3><i class="fas fa-lock"></i> SSL 配置</h3>
    <button class="param-btn" data-command="    ssl_certificate /path/to/cert.pem;">
        <i class="fas fa-certificate"></i> SSL 证书
    </button>
    <button class="param-btn" data-command="    ssl_certificate_key /path/to/private.key;">
        <i class="fas fa-key"></i> SSL 私钥
    </button>
    <button class="param-btn" data-command="    ssl_protocols TLSv1.2 TLSv1.3;">
        <i class="fas fa-shield-alt"></i> SSL 协议
    </button>
</div>

<div class="parameter-group">
    <h3><i class="fas fa-balance-scale"></i> 负载均衡</h3>
    <button class="param-btn" data-command="upstream backend {">
        <i class="fas fa-balance-scale"></i> Upstream 块
    </button>
    <button class="param-btn" data-command="    server backend1.example.com;">
        <i class="fas fa-server"></i> 后端服务器
    </button>
    <button class="param-btn" data-command="    server backend2.example.com weight=2;">
        <i class="fas fa-weight-hanging"></i> 带权重的服务器
    </button>
</div>

<div class="parameter-group">
    <h3><i class="fas fa-network-wired"></i> WebSocket</h3>
    <button class="param-btn" data-command="    proxy_set_header Upgrade $http_upgrade;">
        <i class="fas fa-network-wired"></i> Upgrade 头
    </button>
    <button class="param-btn" data-command='    proxy_set_header Connection "upgrade";'>
        <i class="fas fa-plug"></i> Connection 头
    </button>
</div>

<div class="parameter-group">
    <h3><i class="fas fa-cache"></i> 缓存控制</h3>
    <button class="param-btn" data-command="    expires 30d;">
        <i class="fas fa-clock"></i> 过期时间
    </button>
    <button class="param-btn" data-command='    add_header Cache-Control "public, immutable";'>
        <i class="fas fa-heading"></i> 缓存控制头
    </button>
</div>

<div class="parameter-group">
    <h3><i class="fas fa-ban"></i> 访问控制</h3>
    <button class="param-btn" data-command="    allow 192.168.1.0/24;">
        <i class="fas fa-check-circle"></i> 允许IP
    </button>
    <button class="param-btn" data-command="    deny all;">
        <i class="fas fa-ban"></i> 拒绝所有
    </button>
    <button class="param-btn" data-command="    auth_basic \"Restricted Area\";">
        <i class="fas fa-user-lock"></i> 基本认证
    </button>
</div>
`;